package com.mzy.datepackage.M2022.Feb.Eight;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2022/2/8 20:47
 * @Version 1.0
 */
public class Son extends Father{
    private String name ="小李";
    private static Integer age=20;

    {
        System.out.println("子类：" +this.name);
        this.name="小黄";
        System.out.println("子类：" +this.name);
    }

    static {
        System.out.println("子类静态成员：" + age);
        System.out.println("子类静态代码块");
    }

    public Son() {
        super();
        System.out.println("子类构造器");
    }

    public Son(String name) {
        super("aa");
        this.name = name;
    }

    public static void main(String[] args) {
        Son son = new Son();
    }

    static class a{
        private Integer ages=10;
    }
}
